<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>首页</title>
    <style>
            /* 添加样式以控制头像大小 */
            .avatar {
                width: 50px; /* 设置宽度 */
                height: 50px; /* 设置高度 */
                object-fit: cover; /* 保持图片比例并裁剪 */
            }
    </style>
</head>
<body>
    <p>
        ${user.name}
        <br>
        <img class="avatar" src="${pageContext.request.contextPath}/files/${user.photo}">
        <br>
        Welcome to Spring MVC Tutorial
    </p>

    <br>
    <a href="<c:url value='/user/logout'/>">注销</a>
</body>
</html>
